package org.example.book.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("/test")
public class TestController {
    @RequestMapping("/t1")
    public Integer t1() {
        int a =10/0;
        return a;
    }

    @RequestMapping("/t2")
    public Integer t2() {
        String a = null;
        System.out.println(a.length());
        return a.length();
    }

    @RequestMapping("/t3")
    public Integer t3() {
        Integer[]a ={1,2,3,4,5};
        return a[5];
    }
}
